 function ChkSsn(ItemID, Img, HName, EName, Unit, Price) {
    $.ajax({ type: "POST", url: "Class/ASE.asmx/ChkSsn", data: {}, contentType: "application/json; charset=utf-8", dataType: "json", success: OnSuccess, error: OnError });
    function OnSuccess(data, status) {
        var h = $(window).height()+500;
        if (data.d == 1) {
            window.parent.$("#Img").attr({ "src":Img });
            window.parent.$("#Td1").html(HName);
            window.parent.$("#Td2").html(EName);
            window.parent.$("#Unit").text(Unit);
            window.parent.$("#Price").html("<img src='Images/Rs.png' />&nbsp;" + Price)
            window.parent.$("#HFItemID").val(ItemID);
            window.parent.$("#HFPrice").val(Price);
            window.parent.$("#DdlQnt").val("Select Quantity");
            window.parent.$("#ModalItemOK").addClass("LnkTest");
            window.parent.$(".Popup").height(h);
                        switch(Unit)
                {
                    case 'Kg':
                    window.parent.$('#DdlQnt').empty()
                    window.parent.$('#DdlQnt').append("<option value='Select Quantity'>Select Quantity</option><option value='0.25'>0.25</option><option value='0.5'>0.5</option><option value='1'>1</option><option value='2'>2</option><option value='3'>3</option><option value='4'>4</option><option value='5'>5</option>");
                    break;
                    case 'Doz':
                    window.parent.$('#DdlQnt').empty()
                    window.parent.$('#DdlQnt').append("<option value='Select Quantity'>Select Quantity</option><option value='0.5'>0.5</option><option value='1'>1</option><option value='2'>2</option><option value='3'>3</option><option value='4'>4</option><option value='5'>5</option>");
                    break;
                    case 'Qty':
                    window.parent.$('#DdlQnt').empty()
                    window.parent.$('#DdlQnt').append("<option value='Select Quantity'>Select Quantity</option><option value='1'>1</option><option value='2'>2</option><option value='3'>3</option><option value='4'>4</option><option value='5'>5</option>");
                    break;
                    case 'Pkt':
                    window.parent.$('#DdlQnt').empty()
                    window.parent.$('#DdlQnt').append("<option value='Select Quantity'>Select Quantity</option><option value='1'>1</option><option value='2'>2</option><option value='3'>3</option><option value='4'>4</option><option value='5'>5</option>");
                    break;
                    default:
                    break;
                }
            window.parent.$("#PopItem").show();
            window.parent.$("#PopBack").show();
            window.parent.$("#ImgTot").hide();
            window.parent.$("#LblTot").hide();
        }
        else {
            window.parent.$(".Popup").height(h);
            window.parent.$("#PopLogin").show();
            window.parent.$("#PopBack").show();
        }
    }
    function OnError(request, status, error) { alert("Sorry ! You got some error."); }
}





//$(document).ready(function() {
//    $("#OkBtn1").click(function() {
//        //alert("JJJJ");
//        var Qnt = $("#DdlQnt").val();
//        var ItemID = $("#HFItemID").val();
//        $.ajax({
//            type: "POST",
//            url: "Class/ASE.asmx/AddToCart",
//            data: "{ItemID:'" + ItemID + "',Qnt:'" + Qnt + "'}",
//            contentType: "application/json; charset=utf-8",
//            dataType: "json",
//            success: OnSuccess,
//            error: OnError
//        });
//        function OnSuccess(data, status) {
//            var S = parseInt(data.d);
//            switch (S) {
//                case 0:
//                    alert("Please LogIn Before Continue");
//                    window.location = "LogIn.aspx";
//                    break;
//                case 1:
//                    window.parent.$("#HorzMenu").show();
//                    window.parent.$("#Holder").hide();
//                    window.parent.$("#CartDiv").show();
//                    //window.parent.$("#Holder").css({"background-color":"white"});
//                    window.parent.$("#Cart").attr({ "src": "Cart.aspx" });
//                    $find("MPE1").hide();
//                    break;
//                case 2:
//                    window.parent.$("#HorzMenu").show();
//                    window.parent.$("#Holder").hide();
//                    window.parent.$("#CartDiv").show();
//                    //window.parent.$("#Holder").css({ "background-color": "white" });
//                    window.parent.$("#Cart").attr({ "src": "Cart.aspx" });
//                    $find("MPE1").hide();
//                    break;
//                default:
//                    alert("You Got Some Error");
//            }
//        }
//        function OnError(request, status, error) {
//            alert("Error");
//        }
//    });

//});

//--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
function AddToCart(ItemID, HName, Price) {
    
}

